package com.cykj.mapper;

import com.cykj.pojo.CyCombination;
import com.cykj.pojo.CyProject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CombinationMapper {
    List<CyCombination> getAllCombination();
    int changeStatus(@Param("proStatus") int proStatus, @Param("combinationId") int detailsId);
    int deleteRow(int combinationId);
    List<CyProject> lookInclude(int id);
    List<CyProject> getProjectName(int id);
    int alterInfo(@Param("combinationId") int combinationId,
                  @Param("combinationName") String combinationName,
                  @Param("combinationPrice") int combinationPrice);
    CyCombination searchAlter(@Param("combinationId") int combinationId,
                              @Param("combinationName") String combinationName,
                              @Param("combinationPrice") int combinationPrice);
    //查询项目是否存在
    int searchProject(@Param("id") int id, @Param("name") String name);
    //删除套餐和项目的关系
    int deleteProjectRelative(int id);
    //重新添加项目的关系
    int addProjectRelative(@Param("combinationId") int combinationId, @Param("projectId") int projectId);
    //查询信息
    List<CyCombination> searchInfo(String value);
    //查询套餐名字和删除用的
    List<String> getAllName();
    int commitDelete(String name);
    /**
     * 添加套餐
     * @param name
     * @param price
     * @param status
     * @return
     */
    int addCommit(@Param("name") String name,
                  @Param("price") int price,
                  @Param("status") int status);
    int selectNewCombinationId(@Param("name") String name, @Param("price") int price);
    List<CyProject> borderPriceSearch(@Param("minPrice") int minPrice, @Param("maxPrice") int maxPrice);

}
